<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
use Illuminate\Http\Request;

Route::get('/', function () {
    return view('index')->with('path', '/');
});

Route::get('/epg', function () {
    return view('epg')->with('path', '/epg');
});

Route::get('/smartGuide', function () {
    return view('smartGuide')->with('path', '/smartGuide');
});

Route::get('/smartAdvert', function () {
    return view('smartAdvert')->with('path', '/smartAdvert');
});

Route::get('/cooperation', function () {
    return view('cooperation')->with('path', '/cooperation');
});

Route::get('/about', function () {
    return view('about')->with('path', '/about');
});

Route::get('/s', function (Request $request) {
    $today = strtotime($request->input('today'));

    return view('baidu')->with('year', date("Y", $today))
        ->with('month', (date('m', $today) - 1))
        ->with('day', date('d', $today))
        ->with('hour', date('H', $today))
        ->with('minute', date('i', $today))
        ->with('second', date('s', $today))
        ->with('wd', $request->input('wd'));
});

Route::get('/settime', function () {
    return view('settime');
});